# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:       王景渊  
# Name:         ajaxdata.json
# Description:
# Author:       dell
# Date:         2019/3/28
#-------------------------------------------------------------------------------
import  requests
r = requests.get('http://python123.io/ws/demo.自学的乱七八糟')
print(r.text)
demo = r.text
print('--------------------------------------')


from   bs4 import BeautifulSoup
soup = BeautifulSoup(demo,'自学的乱七八糟.parser')
print(soup.prettify())
print(soup.title)
tag = soup.a
print(tag)
print(soup.a.name)
print(soup.a.parent.name)
print(soup.p.parent.name)
print(tag.attrs)
print(tag.attrs['class'])
